Skip to content

Bring out a test base for scaling tests - #1277

Closed
IlyaPechersky wants to merge 11 commits into
yegor256:masterfrom
IlyaPechersky:issue1264
Closed

Bring out a test base for scaling tests#1277
IlyaPechersky wants to merge 11 commits into
yegor256:masterfrom
IlyaPechersky:issue1264

Conversation

@IlyaPechersky

Copy link
Copy Markdown

If I understood the request from #1264 correctly, we need to reject files with binary code.

To do this, I added a new check in checks.xml , and also added a test with a new one.a java file with binary code.

@pnatashap

Copy link
Copy Markdown
Contributor

@IlyaPechersky File with tests become too long, please create one file in addition
you can use this command locally to check if all is good

mvn -B install -Pqulice

@yegor256

Copy link
Copy Markdown
Owner

@IlyaPechersky actually, #1264 was about something else: we want Qulice to ignore binary files (like PNG, JPEG, or PDF) and don't complain about them. However, your pull request is also interesting, I think we should make it good and then merge.

@IlyaPechersky

Copy link
Copy Markdown
Author

@yegor256 I realized, it turns out I was really solving another problem)
Now I have separated the common methods and the matcher class into a package so as not to duplicate them in the test classes.
Thus, there are now two types of tests: one checks the content of files, the other meta information.

Comment thread qulice-checkstyle/src/test/java/com/qulice/checkstyle/CheckstyleMetainfoTest.java Outdated
@yegor256

Copy link
Copy Markdown
Owner

@pnatashap please, help us review this

Comment thread qulice-checkstyle/src/test/java/com/qulice/checkstyle/Common.java Outdated
Comment thread qulice-checkstyle/src/test/java/com/qulice/checkstyle/Common.java Outdated
Comment thread qulice-checkstyle/src/test/java/com/qulice/checkstyle/CheckstyleMetainfoTest.java Outdated
Comment thread qulice-checkstyle/src/main/resources/com/qulice/checkstyle/checks.xml Outdated
@IlyaPechersky

Copy link
Copy Markdown
Author

@pnatashap do you have any other issues?

@IlyaPechersky

Copy link
Copy Markdown
Author

@yegor256, Are there any more issues?

Comment thread qulice-checkstyle/src/test/java/com/qulice/checkstyle/CheckstyleMetainfoTest.java Outdated
@yegor256

yegor256 commented May 23, 2024

Copy link
Copy Markdown
Owner

@pnatashap can you please take a look one more time?

@IlyaPechersky IlyaPechersky changed the title Ignore files with binary contents automatically Bring out a test base for scaling tests May 27, 2024
@IlyaPechersky

Copy link
Copy Markdown
Author

In this request, two problems were solved at once: making a test base and adding tests for content in files, so for now I have left the solution to only one problem - making a test base

@IlyaPechersky

Copy link
Copy Markdown
Author

@yegor256 I left only one problem

Is there something else to add?

@IlyaPechersky

Copy link
Copy Markdown
Author

@yegor256 Thanks for the article! Replaced inheritance with a utility class

@IlyaPechersky
IlyaPechersky requested a review from yegor256 May 28, 2024 07:57
@yegor256

Copy link
Copy Markdown
Owner

@IlyaPechersky utility classes are also a bad idea in OOP: https://www.yegor256.com/2014/05/05/oop-alternative-to-utility-classes.html

@yegor256

Copy link
Copy Markdown
Owner

We are closing this pull request, because it has merge conflicts with master and has been open for more than a month. Please, forgive us for this: it says nothing about the quality of your work, it's just housekeeping.

If the change still matters to you, please submit a new pull request. It may be very similar to this one, but it has to take into account everything that landed in master since then.

Thank you for contributing, and sorry again for the inconvenience!

@yegor256 yegor256 closed this Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants